]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overview: Start animation after setting coverPane initial state
authorAlessandro Bono <alessandro.bono369@gmail.com>
Sun, 6 Nov 2022 11:17:15 +0000 (12:17 +0100)
committerMarge Bot <marge-bot@gnome.org>
Fri, 25 Nov 2022 15:19:37 +0000 (15:19 +0000)
Since commit 7bd98f3f5fb7e0d1220646b8a4ee7073534a8e8f the onComplete callback
is called right away when animations are disabled. As side effect, now
this._coverPane gets shown/hidden in the wrong order. Start the animation after
setting this._coverPane initial state, so that the animation callback can set the
this._coverPane final state without it being overwritten later.

Move the animation also after emitting the showing and hiding signals. So that the
order showing -> shown and hiding -> hidden is still preserved when animations are
disabled.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6096
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2532>

js/ui/overview.js

index 98b1fa8f7f8c719fc81abbf1ae6b978834617e95..dc6ca57802f3481b46d4f7eec8b7406051b1322d 100644 (file)
@@ -519,13 +519,13 @@ var Overview = class extends Signals.EventEmitter {
 
         Meta.disable_unredirect_for_display(global.display);
 
-        this._overview.prepareToEnterOverview();
-        this._overview.animateToOverview(state, () => this._showDone());
-
         Main.layoutManager.overviewGroup.set_child_above_sibling(
             this._coverPane, null);
         this._coverPane.show();
+
+        this._overview.prepareToEnterOverview();
         this.emit('showing');
+        this._overview.animateToOverview(state, () => this._showDone());
     }
 
     _showDone() {
@@ -573,13 +573,13 @@ var Overview = class extends Signals.EventEmitter {
         this._animationInProgress = true;
         this._visibleTarget = false;
 
-        this._overview.prepareToLeaveOverview();
-        this._overview.animateFromOverview(() => this._hideDone());
-
         Main.layoutManager.overviewGroup.set_child_above_sibling(
             this._coverPane, null);
         this._coverPane.show();
+
+        this._overview.prepareToLeaveOverview();
         this.emit('hiding');
+        this._overview.animateFromOverview(() => this._hideDone());
     }
 
     _hideDone() {